window.onload = function() {
    var left_fix = document.querySelector(".left-fix")
    var right_fix = document.querySelector(".right-fix")
    var main = document.querySelector("#main")
    var mainTop = main.offsetTop
    var returntop1 = document.querySelector("#main>.right-fix>span")

    document.addEventListener("scroll", function() {
        if (window.pageYOffset >= mainTop) {
            left_fix.style.position = "fixed"
            right_fix.style.position = "fixed"
        } else {
            left_fix.style.position = "absolute"
            right_fix.style.position = "absolute"
        }

        if (window.pageYOffset >= 1388) {
            returntop1.style.display = "block"
        } else {
            returntop1.style.display = "none"
        }
    })

    returntop1.addEventListener("click", function() {
        scrollTop(window, 0)
    })
}